#include<bits/stdc++.h>

using namespace std;

#define ll long long

const ll N=1e5+5;

ll n;
ll r[N];
map<ll,ll> mp;
ll ans;

int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);

    ios::sync_with_stdio(false);
    cin.tie(0),cout.tie(0);

    cin>>n;
    ans=n;
    for(ll i=1;i<=n;i++)
    {
        cin>>r[i];
        mp[r[i]]++;
    }

    ll pre=0;
    for(auto i:mp)
    {
        if(pre>=i.second)
        {
            ans-=i.second;
            pre-=i.second;
        }
        else
        {
            ans-=pre;
            pre=0;
        }
        pre+=i.second;
    }

    cout<<ans<<"\n";

    return 0;
}
